package cn.dkdoo.redis.controller;

import cn.dkdoo.bean.vo.SendRequest;
import cn.dkdoo.redis.service.RedisService;
import cn.dkdoo.utils.entity.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author nicky
 * @date 2021/5/14 下午6:50
 */
@RestController
@RequestMapping("/redis")
public class RedisController {
    @Autowired
    RedisService redisService;

    @RequestMapping(value = "/send", method = RequestMethod.POST)
    public BaseResponse send(@RequestBody SendRequest addRequest) {
        BaseResponse response = redisService.send(addRequest);
        return response;
    }

}
